//
//  ZZMyTableViewCell.m
//  ZuZuBao
//
//  Created by Felix on 2024/4/9.
//

#import "ZZMyTableViewCell.h"

@interface ZZMyTableViewCell()

@property (nonatomic, strong) UILabel * titLabel;

@end

@implementation ZZMyTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = kBackColor;
        // 初始化你的UI组件
        UIView * wView = [[UIView alloc] initWithFrame:CGRectMake(kPadding, 10, kScreenWidth - kPadding * 2, 48)];
        wView.backgroundColor = [UIColor whiteColor];
        wView.layer.cornerRadius = 12;
        wView.layer.masksToBounds = YES;
        [self.contentView addSubview:wView];
        
        self.titLabel = [[UILabel alloc] initWithFrame:CGRectMake(kPadding * 2, 10, kScreenWidth / 2, 48)];
        self.titLabel.textColor = k333Color;
        self.titLabel.font = [UIFont boldSystemFontOfSize:16];
        [self.contentView addSubview:self.titLabel];
        
        self.contLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth - kPadding * 2 - 100, 10, 100, 48)];
        self.contLabel.textColor = [UIColor blackColor];
        self.contLabel.font = [UIFont boldSystemFontOfSize:14];
        self.contLabel.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:self.contLabel];
        
        self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWidth - kPadding * 2 - 18, wView.frame.origin.y + 16, 18, 18)];
        [self.imgView setImage:[UIImage imageNamed:@"arrow_right_icon"]];
        [self.contentView addSubview:self.imgView];
    }
    return self;
}

-(void)setCellData:(NSString *)text {
    self.titLabel.text = text;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
